<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>设置</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vant@1.6/lib/index.css">
		<script src="html5plus://ready"></script>
		<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.min.js"></script>
		<script src="https://cdn.jsdelivr.net/npm/vant@1.6/lib/vant.min.js"></script>
		<script src="html5plus://ready"></script>	
		<script src="../../js/fanhui.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<style>
		.white{
			color: white;
		}
	</style>
	<body>
		<div id="app">
			<header>
				<van-nav-bar @click-left="onClickLeft" style="background-color: red;">
					<van-icon slot="left" name="arrow-left" color="white"></van-icon>
					<label slot="title" class="white">设置</label>
				</van-nav-bar>
			</header>
			<section>
				<van-cell title="修改登录密码" is-link @click="xiugai" />
				</van-cell>
				<van-cell title="清理缓存" @click="qingli" is-link>
				</van-cell>

				<van-row>
					<van-col style="padding-top: 10px;" span="20" offset="2">
						<van-button style="padding: 1px 120px;" type="danger" @click="exit">退出登录</van-button>
					</van-col>
				</van-row>
			</section>

		</div>
		<script type="text/javascript">
			var vm = new Vue({
				el: "#app",
				data: {

				},

				methods: {
					qingli:function(){
						vm.$toast("缓存清理成功!");
					}
					xiugai: function() { //修改登录密码
						plus.webview.open("xgmm.html", "xgmm");
					},
					onClickLeft: function() { //返回个人中心
						plus.webview.close(plus.webview.currentWebview(), "slide-out-left");
					},
					exit: function() { //退出
						this.$dialog.confirm({
							title: '确定退出登录吗'
						}).then(() => {
							//确认按钮
							localStorage.clear();//清除用户信息
							var personal=plus.webview.getWebviewById("abc");
							personal.reload(true);
							plus.webview.close(plus.webview.currentWebview(),"slide-out-left");//关闭当前页面,返回个人中心
						}).catch(() => {
							//取消按钮
						});
						
					}
				},
			})
		</script>
	</body>
</html>